<?php

mac swoole 安装

git clone https://gitee.com/swoole/swoole.git


/usr/local/Cellar/php@7.1/7.1.21/bin/phpize

/usr/local/software/php71/bin/phpize
./configure --with-php-config=/usr/local/software/php71/bin/php-config

make -j

make install


localhost:swoole modongxiao$ make install
Installing shared extensions:     /usr/local/Cellar/php@7.1/7.1.21/pecl/20160303/
Installing header files:          /usr/local/Cellar/php@7.1/7.1.21/include/php/

这是因为没有安装 AMQP 的依赖包 rabbitmq-c 所致
http://www.blogdaren.com/post-2537.html
# wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.8.0/rabbitmq-c-0.8.0.tar.gz
# tar zxf rabbitmq-c-0.8.0.tar.gz
# cd rabbitmq-c-0.8.0
# ./configure --prefix=/usr/local/rabbitmq-c
# make && make install
 # ./configure --with-php-config=/path/to/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c/
 # make && make install

PHP 使用 Kafka 安装拾遗
https://segmentfault.com/a/1190000016310618
$ git clone https://github.com/edenhill/librdkafka.git
$ cd librdkafka
$ ./configure
$ make && make install



/usr/local/Cellar/php@7.1/7.1.21/bin/phpize
./configure --with-php-config=/usr/local/Cellar/php@7.1/7.1.21/bin/php-config



localhost:phpredis modongxiao$ cd /usr/local/Cellar/php@7.1/7.1.21/pecl/20160303/
localhost:20160303 modongxiao$ ls
redis.so    swoole.so
